package com.uex.dev.manage.common.utils;

import org.apache.commons.lang3.RandomStringUtils;

/**
 * @author wangc
 * @create 2023/9/27
 * @description
 */
public class RandomUtils {
    private static final char[] CHARS_FOR_RANDOM = "abcdefghijklmnopqrstuvwxyz0123456789".toCharArray();
    private static final char[] NUM_FOR_RANDOM = "0123456789".toCharArray();

    public static String randomString(int length) {
        return RandomStringUtils.random(length, CHARS_FOR_RANDOM);
    }

    public static String randomNum(int length) {
        return RandomStringUtils.random(length, NUM_FOR_RANDOM);
    }
}
